<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>主页</title>
</head>
    <style type="text/css">
        body ,ul{margin: 0; padding: 0;}
        ul{list-style:outside none none;     }
        #nav{
            width: 100%;
            height: 45px;
            background-color: #459df5;
        }
        #nav ul{
            margin: 0 auto;
            width: 1000px;
        }
        #nav li{
              display: inline-block;
              width: 120px;
              height: 45px;
              line-height: 45px;
              float: left;
         }
         #nav li a{
            text-decoration: none;
            color: white;
            display: block;
            text-align: center;
            font-size: 20px;
         }
          #nav li a:hover{
            background-color: #338ce6;
          }
         .active{
            background-color: #338ce6;
         }
        #wba{
            margin-right:3%;
        }
    </style>
<body>

<div id="wba" align="right">
        <span><a href="{% url 'new_index' %}">首页</a></span>&nbsp;&nbsp;
        {% if request.user.is_authenticated  %}
        <span>Welcome.{{ request.user }}</span>&nbsp;&nbsp;
        <span><a href="{% url 'Personal_Center_index' %}">个人中心</a></span>&nbsp;&nbsp;
            <span><a href = "{% url 'loginout'  %}">退出登录</a></span>&nbsp;&nbsp;
        {% else %}
        <span><a href="{% url 'new_login' %}">请登录</a></span>&nbsp;&nbsp;
        {% endif %}
</div>
 <nav id="nav">
        <ul>
           <li><a href="{% url 'new_index' %}" >首页</a></li>
           <li><a href="#" >安卓app</a></li>
           <li><a href="#" class="active">代理ip</a></li>
           <li><a href="#">用户</a></li>
           <li><a href="#">权威合作</a></li>
           <li><a href="#">手机百科</a></li>
        </ul>
      </nav>
<div id="formbackground" style="position:absolute; width:100%; height:100%; z-index:-1">
{% load static %}
    <img src="{% static images %}" alt="哈哈哈" height="100%" width="100%"/></div>

代理ip：<br /><br />
<label><input name="Radio" type="Radio" value="001" id="Radio1" onclick="check234()"/>更新代理 </label>
<label><input name="Radio" type="Radio" value="002" id="Radio2" onclick="check234()"/>查询最近 </label>
<label><input name="Radio" type="Radio" value="003" id="Radio3" onclick="check234()"/>查询所有 </label>
<label><input name="Radio" type="Radio" value="004" id="Radio4" onclick="check123()" />日期查询 </label>
<label><input type="date" name='date' id='date' value="" style="display:none"/></label>
    <br>
    <label><input  type="submit" onclick="check()" value="开始" class="btn" onmouseover="this.style.backgroundColor='#FF8D00'" onmouseout="this.style.backgroundColor='#FC5628'"></label>
<p id="message" class="asd" style="color: red;"></p>
</body>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<script>
    //获取当前日期
    function check123() {
        var d = new Date();
        var month = d.getMonth() + 1;
        var strDate = d.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var str_1 = d.getFullYear()+"-"+month+"-"+strDate;
        document.getElementById("date").value = str_1;
        document.getElementById("date").style.display = 'inline';
    }
    function check234() {
        document.getElementById("date").style.display = 'none';
    }
    function check(){
        var name1=document.getElementsByName("Radio");
        for(var i=0;i<name1.length;i++) {
            if (name1[i].checked) {
                var a = name1[i].value;
                if (a == '001'){
                    document.getElementById("message").innerHTML = '正在更新...';
                }
                if ( a == '004'){
                    var date = document.getElementById("date").value;
                }
                else{
                    var date = 'None';
                }
                jQuery.get("test/", { Radio: name1[i].value,Date: date}, function (cc) {
                    $('#message').html(cc.message);
                });
                return true;
            }
        }
    }
</script>




</html>